package com.lovo.manage_back.controller;

import com.lovo.manage_back.result.GlobalHandleException;
import com.lovo.manage_back.result.ResponseResult;
import com.lovo.manage_back.result.ResultCode;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class IndexController {
    @RequestMapping("/authenticationError")
    @ResponseResult
    public Object authenticationError() throws GlobalHandleException {
        throw new GlobalHandleException(ResultCode.USER_NOT_LOGGED_IN);
    }
    @RequestMapping("/authorizationError")
    @ResponseResult
    public Object authorizationError() throws GlobalHandleException {
        throw new GlobalHandleException(ResultCode.USER_AUTHORIZATION_ERROR);
    }

}
